//
//  VisitResult.swift
//  ShopIOS
//
//  Created by Apple on 2019/8/12.
//  Copyright © 2019 Apple. All rights reserved.
//

import Foundation
import SwiftyJSON
struct VisitResult {
    var Success: String?
    var Product = [VisitProduct]()
    
    init(json: JSON) {
        Success = json["Success"].stringValue
        Product = json["Product"].arrayValue.compactMap({ VisitProduct(json: $0)})
    }
}

struct VisitProduct {
    var ProductName: String?
    var ProductPrice: Int = 0
    var ImagePath: String?
    var BrowseTime: String?
    var ProductId: Int = 0
    var UserId: Int = 0
    
    init(json: JSON) {
        ProductName = json["ProductName"].stringValue
        ProductPrice = json["ProductPrice"].intValue
        ImagePath = json["ImagePath"].stringValue
        BrowseTime = json["BrowseTime"].stringValue
        ProductId = json["ProductId"].intValue
        UserId = json["UserId"].intValue
    }
}
